package com.weiyi.digitaloperatingroom;

import android.app.Application;
import android.content.Context;

import com.wjr.braveheart.http.GoHttp;
import com.wjr.braveheart.http.GoHttpConfig;
import com.wjr.braveheart.http.converter.JsonParseFactory;
import com.wjr.braveheart.http.okhttp.OkHttpEngine;
import com.wjr.braveheart.utils.AppConfig;
import com.wjr.braveheart.utils.ToastUtils;

public class DORApplication extends Application {
    private static Context context;

    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
        AppConfig.getInstance().init(this);
        ToastUtils.init(this);
        GoHttpConfig config = new GoHttpConfig.Builder().engine(new OkHttpEngine())
                .addConverterFactory(JsonParseFactory.create())
                .build();
        GoHttp.config(config);

        /**
         * 测试语音播放
         */
//        TTSUtils.init(new BaiDuTTS(this));

    }

    public static Context getContext() {
        return context;
    }

}
